﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using LoungeRepo.Core;
using LoungeRepo.Core.Extensions;
using NUnit.Framework;

namespace Integrationtest.LoungeRepo.Core.Extensions
{
    [TestFixture]
    public class testILoungeRepositoryExtensions
    {
        [Test]
        public void Prefetch_entity()
        {
            using(var repo = new LoungeRepository())
            {
                repo.Store("hello", "1", "part");
            }

            //TODO: loaded entities are not cached yet
            using(var repo = new LoungeRepository())
            {
                repo.PrefetchAllEntities();

                Assert.AreEqual(1, repo.GetExtent<string>().Count());
            }
        }
    }
}
